#!/bin/bash

cp /mnt/rootfs/stuff/dropbear/System/Library/LaunchDaemons/com.atvMod.dropbear.plist /mnt/OSBoot/System/Library/LaunchDaemons/
chown 0:0 /mnt/OSBoot/System/Library/LaunchDaemons/com.atvMod.dropbear.plist
chmod 755 /mnt/OSBoot/System/Library/LaunchDaemons/com.atvMod.dropbear.plist


cp /mnt/rootfs/stuff/dropbear/usr/bin/{dbclient,dropbear,dropbearconvert,dropbearkey,scp} /mnt/OSBoot/usr/bin/
chown 0:0 /mnt/OSBoot/usr/bin/{dbclient,dropbear,dropbearconvert,dropbearkey,scp}
chmod 755 /mnt/OSBoot/usr/bin/{dbclient,dropbear,dropbearconvert,dropbearkey,scp}

cp /mnt/rootfs/stuff/dropbear/usr/lib/libarmfp.dylib /mnt/OSBoot/usr/lib/
chown 0:0 /mnt/OSBoot/usr/lib/libarmfp.dylib
chmod 755 /mnt/OSBoot/usr/lib/libarmfp.dylib

cp /mnt/rootfs/stuff/dropbear/Users/frontrow/.bash_login /mnt/Media/Scratch/Users/frontrow/
chown 501:501 /mnt/Media/Scratch/Users/frontrow/.bash_login
chmod 755 /mnt/Media/Scratch/Users/frontrow/.bash_login

cp /mnt/rootfs/stuff/dropbear/usr/libexec/{dropbear-banner,dropbear-wrapper,sftp-server} /mnt/OSBoot/usr/libexec/
chown 0:0 /mnt/OSBoot/usr/libexec/{dropbear-banner,dropbear-wrapper,sftp-server}
chmod 755 /mnt/OSBoot/usr/libexec/{dropbear-banner,dropbear-wrapper,sftp-server}
